package shiqi.util;

import com.deepoove.poi.XWPFTemplate;

import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;

/**
 * @author geo_tsg
 * @version 1.0.0
 * @ClassName poiTlUtils.java
 * @Description
 * @createTime 2022-04-20
 */
public class poiTlUtils {

    public static void main(String[] args) throws IOException {

        String filePath = "D:\\shiqinote\\template\\hangzhou.docx";

        String targetPath = "D:\\shiqinote\\template\\hangzhouTarget.docx";

        XWPFTemplate.compile(filePath).render(
                new HashMap<String, Object>() {
                    {

                        put("road", "测试");
                    }

                }).write((new FileOutputStream(targetPath)));
    }
}
